home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
User's Choice Windows CD
/
User's Choice Windows CD (CMS Software)(1993).iso
/
win_u_z
/
vlistsam.zip
/
DLLSTUFF.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-06-09
|
3KB
|
93 lines
//---------------------------------------------------------------------------
// DLLSTUFF - Windows DLL support functions
//
// This File contains the source code for the standard DLL functions
//
// Author: Kyle Marsh
// Windows Developer Technology Group
// Microsoft Corp.
//
//---------------------------------------------------------------------------
#include "vlistint.h"
//---------------------------------------------------------------------------
// Function declarations
//---------------------------------------------------------------------------
int FAR PASCAL LibMain(HANDLE hModule, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine);
int FAR PASCAL WEP (int bSystemExit);
//---------------------------------------------------------------------------
// Global Variables...
//---------------------------------------------------------------------------
HANDLE hInstance; // Global instance handle for DLL
//---------------------------------------------------------------------------
// LibMain
//---------------------------------------------------------------------------
int FAR PASCAL LibMain(HANDLE hModule, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine)
{
hInstance = hModule;
RegisterVListBox(hInstance);
return 1;
}
// RegisterVListBox
//
// Purpose:
// Registers the Virtual List Box control class
//
// Parameters:
// hInstance HANDLE Instance of the application or DLL that will
// own this class.
//
// Return Value:
// BOOL TRUE if the class is registered, FALSE otherwise.
// TRUE is also returned if the class was already
// registered.
BOOL RegisterVListBox(HANDLE hInstance)
{
static BOOL bRegistered=FALSE;
WNDCLASS wndcls;
char szVListBox[10];
if (!bRegistered) {
LoadString(hInstance, IDS_VLBOXNAME, szVListBox, 10);
wndcls.style = CS_DBLCLKS| CS_GLOBALCLASS|CS_PARENTDC;
wndcls.lpfnWndProc = VListBoxWndProc;
wndcls.cbClsExtra = 0;
wndcls.cbWndExtra = sizeof(HANDLE);
wndcls.hInstance = hInstance;
wndcls.hIcon = NULL;
wndcls.hCursor = LoadCursor(NULL, IDC_ARROW);
wndcls.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wndcls.lpszMenuName = NULL;
wndcls.lpszClassName = (LPSTR)szVListBox;
bRegistered=RegisterClass(&wndcls);
}
return bRegistered;
}
#pragma alloc_text(FIXEDSEG, WEP)
//---------------------------------------------------------------------------
// WEP
//---------------------------------------------------------------------------
int FAR PASCAL WEP (int bSystemExit)
{
return(1);
}